<?php
/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_main_product_image.php 18698 2011-05-04 14:50:06Z wilt $
 */
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
<div id="productMainImage" class="centeredContent relative">
<?php
preg_match('@src="([^"]*)"@', zen_image($products_image_large), $image_src);

if(false){
	echo '<a class="product_images" href="' . $image_src[1] . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="image"') . '</a>';
}else{
	echo '<a class="product_images cloud-zoom" href="' . $image_src[1] . '" id="zoom1" rel="adjustX: 10, adjustY:-4, tint:\'#ffffff\',tintOpacity:0.2, zoomWidth:360, showTitle: false, position: \'inside\' ">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="image"') . '</a>';
	echo '<a id="zoomImage" class="productImagesGallery" href="' . $image_src[1] . '"><i class="icon-zoom-in"></i> '.TEXT_ZOOM.'</a>';
}
?>
<noscript>
<?php
  echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</noscript>
</div>